function delay(word){
  return  new Promise((reslove,reject)=>{
      setTimeout(()=>{
        reslove(word)
      },1000)
  })
}

async function start(){
  const word1=await delay('孙悟空');
  console.log(word1);
  const word2=await delay('沙和尚');
  console.log(word2);
  const word3=await delay('朱白洁');
  console.log(word3);
}
start()
//promise模式
/*
delay('孙悟空')
  .then((word)=>{
    console.log(word)
    return delay('猪八戒')
  })
  .then((word)=>{
    console.log(word)
  })*/
